/* 
 * File:   GpTreeCreature.h
 * Author: jcrada
 *
 * Created on April 14, 2009, 10:34 PM
 */

#ifndef _GPTREECREATURE_H
#define	_GPTREECREATURE_H

#include "FunctionNode.h"
#include "TreeOfNodes.h"
#include "IdNode.h"
#include "Creature.h"

namespace jcrada{
    class GpTreeCreature : public FunctionListener{
    private:
        TreeOfNodes* _morphology;
    protected:
        virtual void swap(int a, int b);
        virtual void swap(IdNode& a, IdNode&b);
        virtual void move(int a, int b);
    public:
        virtual void evaluate(const FunctionNode& function);
        virtual void setup(Creature& creature);

        virtual void setMorphology(TreeOfNodes& morphology){
            this->_morphology = &morphology;
        }

        virtual TreeOfNodes& getMorphology() const{
            return *this->_morphology;
        }

    };
}

#endif	/* _GPTREECREATURE_H */

